package com.touzhijia.authority.domain.dto.response;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 作者： lzw<br/>
 * 创建时间：2018-03-17 21:29 <br/>
 */
@NoArgsConstructor
@Data
public class LoginRes implements Serializable {

    /**
     * 是否登录成功
     */
    private Boolean success;

    /**
     * 错误消息
     */
    private String message;

    /**
     * 时间戳
     */
    private Long timestamp = System.currentTimeMillis();

    /**
     * 当前登录用户信息
     */
    private UserRes user;

    public LoginRes(Boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public LoginRes(Boolean success, String message, UserRes user) {
        this.success = success;
        this.message = message;
        this.user = user;
    }
}
